<?php
/**
 *
 * 动态记录浏览内容
 *
 */
require_once(dirname(__FILE__)."/../include/common.inc.php");
$aid = intval($aid);
$addtime = time();
$ip = Getip();
if($aid!=''){
   $moxingid = $dsql->GetOne("SELECT litpic FROM `#@__archives` WHERE id='$aid'");
   $litpic =$moxingid[litpic];

   require_once(DEDEINC."/memberlogin.class.php");
   $ml = new MemberLogin();
   //查询状态
   $row = $dsql->GetOne("Select * From `#@__jilu` where aid='$aid' and mid='{$ml->M_ID}' ");
   if( !is_array($row) ){
       $dsql->ExecuteNoneQuery(" INSERT INTO `#@__jilu`(mid,aid,addtime,ip) VALUES ('".$ml->M_ID."','$aid','$addtime','$ip'); ");
 
   }else{
       $dsql->ExecuteNoneQuery("UPDATE `#@__jilu` SET addtime='$addtime',ip='$ip' where aid='$aid' and mid='{$ml->M_ID}' ");	 
   }
   exit;
}else{ 
   exit;
}
?>